using System;
using System.Collections.Generic;
using System.Text;
using Mpi.Common.Collections;

namespace Xeml.Document
{
    public class PartitionCollection : ObservableIdCollectionBase<Partition,int>
    {
        private Observation _observation;
        public Observation Observation
        {
            get
            {
                return _observation;
            }
        }

        public PartitionCollection(Observation owner)
        {
            _observation = owner;
        }

        protected override int GetIdentifiere(Partition item)
        {
            return item.Id;
        }

        protected override void SetOwner(Partition item)
        {
            item.Collection = this;
        }

        protected override void RemoveOwner(Partition item)
        {
            item.Collection = null;
        }
    }
}
